Skip to content

CDRIVER-6300 CSFLE/QE Support for HTTP Proxies#2318

Open
mdb-ad wants to merge 3 commits into
mongodb:masterfrom
mdb-ad:http-proxy
Open

CDRIVER-6300 CSFLE/QE Support for HTTP Proxies#2318
mdb-ad wants to merge 3 commits into
mongodb:masterfrom
mdb-ad:http-proxy

Conversation

@mdb-ad

@mdb-ad mdb-ad commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Testing with the proxy server (from drivers-evergreen-tools): https://spruce.corp.mongodb.com/version/6a30961530385700079ea274

@mdb-ad mdb-ad marked this pull request as ready for review June 16, 2026 17:37
@mdb-ad mdb-ad requested a review from a team as a code owner June 16, 2026 17:37
@mdb-ad mdb-ad requested a review from eramongodb June 16, 2026 17:37

/* Returns a connected stream to (host, port). The driver wraps the returned
* stream with TLS. Return NULL and set @error on failure. */
typedef mongoc_stream_t *(BSON_CALL *mongoc_kms_connect_callback_fn)(const char *host,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation for new API (e.g. see mongoc_oidc_callback_fn_t).

void *userdata);

MONGOC_EXPORT(void)
mongoc_auto_encryption_opts_set_kms_connect_callback(mongoc_auto_encryption_opts_t *opts,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation for new API.

void *userdata);

MONGOC_EXPORT(void)
mongoc_client_encryption_opts_set_kms_connect_callback(mongoc_client_encryption_opts_t *opts,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing documentation for new API.

static int
_skip_if_no_kms_proxy(void)
{
return getenv("MONGOC_TEST_KMS_PROXY_HOST") ? 1 : 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this env var set anywhere in CI?

if (!base_stream) {
goto fail;
if (connect_cb && connect_cb->fn) {
base_stream = connect_cb->fn(host.host, (int32_t)host.port, connect_cb->userdata, error);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should connecttimeoutms be forwarded to the callback function?

/* Returns a connected stream to (host, port). The driver wraps the returned
* stream with TLS. Return NULL and set @error on failure. */
typedef mongoc_stream_t *(BSON_CALL *mongoc_kms_connect_callback_fn)(const char *host,
int32_t port,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int32_t port,
uint16_t port,

Consistency with mongoc_host_list_t::port:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants